Dynomotion

Group: DynoMotion Message: 8355 From: morgtod Date: 9/15/2013
Subject: Hydraulic bender
Tom,
 I have a tubing bender that is driven by hydraulic cylinders with solenoids.  Is it possible to hook a rotary encoder to the bend head to measure the degree of bend, and control the hydraulic solenoids? 

 So if I want a 45 degree bend, I would enter something like G1 A45, and it would power the bend solenoid until 45 degrees, then disable the solenoid ( just triggering a bit on and off ), 


Could you point me to an example?

Todd
Group: DynoMotion Message: 8361 From: Tom Kerekes Date: 9/15/2013
Subject: Re: Hydraulic bender
Hi Todd,

Could you think it through and provide more description of how you envision things should work?  I think some Users have created press brakes that work with a proportional valve and work much like a servo to move along a defined trajectory.  But it sounds like you want something simpler.  If you would want a 45 degree bend by entering G1 A45 that would assume that you were originally at A0?  So one idea would be to set the A axis up like a dummy Axis with very high speed.  Commanding G1 A45 F10000 would cause the Axis Destination to suddenly change from 0 to 45 degrees.  A KFLOP User program could then detect a positive change in ch0->Dest and enable the solenoid.  The program could then monitor the encoder Position and as soon as it reached the Destination disable the solenoid (if (ch0->Position > ch0->Dest) ClearBit(26);  ??

This would necessarily overshoot the target.  You might also monitor the velocity and assume some fixed time to stop and disable the solenoid before reaching the target.

How would you move back to zero?

I don't know of any similar example.  The closest might be OutputToPWM.c which monitors an axis Output and controls a PWM.  Actually something like that might work as well.  You might monitor the Axis Output.  A move would cause a change in destination which would generate a big Output.  That might be used to turn on the solenoid.  When the Output drops to Zero (getting close to target - depending on tuning) then turn off the solenoid.  Filtering and D Gain (Lead Compensation) might work to stop in advance.

Regards
TK

Group: DynoMotion Message: 8366 From: morgtod Date: 9/16/2013
Subject: Re: Hydraulic bender

 Tom,

  The bend axis will be the C axis.  Could it be a simple as-


(cmd,SetBitBuf26)

G1 C45

(cmd,ClearBitBuf26)


This would only work if the Kflop reads the encoder counts and only moves to the next line once the C45 has been achieved.  I would assume this would be setup as encoder input, no output.



Slight overshoot would not be a problem, there would be other hydraulic latency and springbacks that would have to be accounted for in the bending software.



--- In dynomotion@yahoogroups.com, <tk@...> wrote:

Hi Todd,

Could you think it through and provide more description of how you envision things should work?  I think some Users have created press brakes that work with a proportional valve and work much like a servo to move along a defined trajectory.  But it sounds like you want something simpler.  If you would want a 45 degree bend by entering G1 A45 that would assume that you were originally at A0?  So one idea would be to set the A axis up like a dummy Axis with very high speed.  Commanding G1 A45 F10000 would cause the Axis Destination to suddenly change from 0 to 45 degrees.  A KFLOP User program could then detect a positive change in ch0->Dest and enable the solenoid.  The program could then monitor the encoder Position and as soon as it reached the Destination disable the solenoid (if (ch0->Position > ch0->Dest) ClearBit(26);  ??

This would necessarily overshoot the target.  You might also monitor the velocity and assume some fixed time to stop and disable the solenoid before reaching the target.

How would you move back to zero?

I don't know of any similar example.  The closest might be OutputToPWM.c which monitors an axis Output and controls a PWM.  Actually something like that might work as well.  You might monitor the Axis Output.  A move would cause a change in destination which would generate a big Output.  That might be used to turn on the solenoid.  When the Output drops to Zero (getting close to target - depending on tuning) then turn off the solenoid.  Filtering and D Gain (Lead Compensation) might work to stop in advance.

Regards
TK

Group: DynoMotion Message: 8369 From: Tom Kerekes Date: 9/16/2013
Subject: Re: Hydraulic bender
Hi Todd,

KFLOP does not normally wait for the encoders to move or be within a tolerance.  That could result in erratic motion.  It assumes the servo will follow within a tight tolerance or fault with a Following Error.

But you could create a MCode to do this:

#include "KMotionDef.h"

main()
{
    //Solenoid on
    SetBit(26);

    // wait until Encoder Position catches
    // up with the commanded Destination
    while (ch0->Position < ch0->Dest) ;
   
    //Solenoid off
    ClearBit(26);
}


This will activate the solenoid, wait until the position is reached, and then disable the solenoid.  You might assign this program to MCode M100 Execute/wait/sync.  Then code:
 
G0 C45  (quickly change the Destination)
M101    (activate solenoid, wait for encoder, disactivate)

HTH
Regards
TK


Group: DynoMotion Message: 8370 From: morgtod Date: 9/16/2013
Subject: Re: Hydraulic bender


 That's what I was looking for!  


 I will mock up  the system and try it out.


Thanks again,

Todd



--- In dynomotion@yahoogroups.com, <tk@...> wrote:

Hi Todd,

KFLOP does not normally wait for the encoders to move or be within a tolerance.  That could result in erratic motion.  It assumes the servo will follow within a tight tolerance or fault with a Following Error.

But you could create a MCode to do this:

#include "KMotionDef.h"

main()
{
    //Solenoid on
    SetBit(26);

    // wait until Encoder Position catches
    // up with the commanded Destination
    while (ch0->Position < ch0->Dest) ;
   
    //Solenoid off
    ClearBit(26);
}


This will activate the solenoid, wait until the position is reached, and then disable the solenoid.  You might assign this program to MCode M100 Execute/wait/sync.  Then code:
 
G0 C45  (quickly change the Destination)
M101    (activate solenoid, wait for encoder, disactivate)

HTH
Regards
TK